/*
1.日志消息类，进行日志中间消息的存储
*/
#ifndef __M_MSG_H__
#define __M_MSG_H__
#include"level.hpp"
#include"util.hpp"
#include<iostream>
#include<string>
#include<thread>
namespace viclog
{
    struct LogMsg
    {
        time_t _ctime;//日志产生的时间戳
        LogLevel::value _level;//日志等级
        size_t _line;//行号
        std::thread::id _tid;//线程id
        std::string _file;//文件名
        std::string _logger;//日志器名字
        std::string _paylaod;//有效载荷

        LogMsg(LogLevel::value level,size_t line,
        const std::string file,
        const std::string logger,
        const std::string msg):
        _ctime(util::Date::now()),
        _level(level),
        _line(line),
        _tid(std::this_thread::get_id()),
        _file(file),
        _logger(logger),
        _paylaod(msg)
        {}
    };
}
#endif